//一个url地址---地址和组件形成一对一关系，
import { createRouter ,createWebHistory} from "vue-router";
//引入相应，站点组件和login组件

import Login from "@/views/Login.vue";//登录
import Index from "@/views/Index.vue";//首页
import TaskManage from "@/views/TaskManage.vue";//首页子路由任务管理
import SchoolAct from "@/views/SchoolAct.vue";//首页子路由学院动态
import SiteSet from "@/views/system/SiteSet.vue"//首页系统设置的二级菜单的站点设置
import Faculty from "@/views/system/Faculty.vue"//首页系统设置的二级菜单的院系管理

const router=createRouter({
  history:createWebHistory(),
  routes:[
    {path:"/",
      redirect:"/login"
    },
   {
    path:"/login",
    name:"login", 
    component:Login
  },{
    path:"/siteSet",
    name:"siteSet",
    component:SiteSet
  },{
    path:"/faculty",
    name:"faculty",
    component:Faculty
  }
  
  ,{
    path:"/index",
    name:"index",
    component:Index,
    children:[{
      path:"taskManage",
      name:"taskManage",
      component:TaskManage
    },{
      path:"schoolAct",
      name:"schoolAct",
      component:SchoolAct
    }
 ]
  }

  ]
})
export default router;//抛出去使用
